From b34d4115202a78013e2fd8b83594abc246c57632 Mon Sep 17 00:00:00 2001 From: Elliott Mitchell Date: Fri, 17 Jul 2020 12:05:25 -0700 Subject: [PATCH] d/shuffle-boot-files: The Great Quotification These should originate with the owner of a build system and are unlikely to get hazardous values. This script though *should* work on a system with such a bizzare setup. On general principle, add lots of double-quotes. Signed-off-by: Elliott Mitchell Acked-by: Hans van Kranenburg --- debian/shuffle-boot-files | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/debian/shuffle-boot-files b/debian/shuffle-boot-files index f7492c0c72..683788d40a 100755 --- a/debian/shuffle-boot-files +++ b/debian/shuffle-boot-files @@ -2,13 +2,13 @@ set -e -version=$1; shift -flavour=$1; shift +version="$1"; shift +flavour="$1"; shift t=debian/tmp -hv=xen-hypervisor-$version-$flavour -dest=debian/$hv/boot -mkdir -p $dest +hv="xen-hypervisor-$version-$flavour" +dest="debian/$hv/boot" +mkdir -p "$dest" # The upstream build system puts a pile of needless symlinks in /boot. # @@ -21,11 +21,11 @@ mkdir -p $dest # more useful when the -i386 flavour existed and was coinstallable # with the -amd64 flavour.) -verstring=$(readlink debian/tmp/boot/xen.gz || - readlink debian/tmp/boot/xen) -verstring=${verstring##*/} -verstring=${verstring%.gz} +verstring="$(readlink debian/tmp/boot/xen.gz || + readlink debian/tmp/boot/xen)" +verstring="${verstring##*/}" +verstring="${verstring%.gz}" -for f in `cd $t/boot && find * -type f -print`; do - cp -v $t/boot/$f $dest/${f/$verstring/xen-$version-$flavour} +for f in `cd "$t/boot" && find * -type f -print`; do + cp -v "$t/boot/$f" "$dest/${f/$verstring/xen-$version-$flavour}" done -- 2.30.2